package com.wrx.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wrx.server.pojo.Bar;
import com.wrx.server.pojo.BarRegisterParam;
import com.wrx.server.pojo.RespBean;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  贴吧类
 * </p>
 *
 * @author wrx
 * @since 2021-04-20
 */
public interface IBarService extends IService<Bar> {

    /**
     * 创建吧
     * @param request
     * @return
     */
    public RespBean registerBar(Bar bar,HttpServletRequest request);


//    public List<Bar> putAllBarByPageF(int pageNum, int pageSize);

    /**
     * 用PageHelper分页输出贴吧
     * @param pageNum
     * @param pageSize
     * @return
     */
    RespBean putAllUserByPage(int pageNum,int pageSize);

    /**
     * 根据bar_id查询一条贴吧记录
     * @param bar_id
     * @return
     */
    RespBean selBarById(int bar_id);

    /**
     * 根据bar_id查询一条贴吧记录以及吧主昵称
     * @param bar_id
     * @return
     */
    RespBean selBarInfoAndUserNetNameById(int bar_id);

    /**
     * 根据bar_id查询一条贴吧记录、吧主昵称以及是否关注
     * @param bar_id
     * @return
     */
    RespBean selBarInfoUserNetNameCollectStateById(int bar_id,HttpServletRequest request);

    /**
     * 根据theme_post_id查询一条贴吧记录
     * @param theme_post_id
     * @return
     */
    RespBean selBarByThemePostId(int theme_post_id);

    /**
     * 模糊查询贴吧，根据贴吧名
     * @param searchInfo
     * @return
     */
    RespBean selLikeBarByInfo(String searchInfo);
}
